/**
 * main.js用于全局注册插件:Vue.use()和Vue.prototype.$http=axios
 */
import "vue-croppa/dist/vue-croppa.css";
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import Croppa from "vue-croppa";
Vue.use(Croppa);
import 'components/_globals'
import "./registerServiceWorker";
import common from "@utils/common";
Vue.use(common);


// 模拟数据mock.js
require("./mock.js");
//全局引入iconfonts
import "./assets/iconfonts/iconfont.css";
//全局引入resets
import "./assets/less/index.less";

//全局注册mintUI
import MintUI from "mint-ui";
import "mint-ui/lib/style.css";
Vue.use(MintUI); //注册组件
Vue.prototype.$mt = MintUI; //注册方法 //这步可以不要，以前不知道，其实都是封装好的：如Toast可以this.$toast,MessageBox可以this.$messagebox,Loading可以this.$loading前面加一个$即可

//全局注册自定义过滤器插件:详见assets/utils/filters.js
import filterUtils from "assets/utils/filters";
Vue.use(filterUtils); //得到了全局过滤器

//全局注册axios网络请求
import axios from "axios";
Vue.prototype.$axios = axios;

//全局注册自定义本地存储
import localStorage from "assets/utils/storage";
Vue.use(localStorage); //得到了本地存储对象

//全局注册elementUI组件库
import elementUI from "element-ui";
//单独引入样式
import "element-ui/lib/theme-chalk/index.css";
Vue.use(elementUI);
// 全局注册weui的css样式，逻辑需要借助weui.js
import "weui/dist/style/weui.css";
import weui from "weui.js"; //单独引入weuiJS
Vue.prototype.$weui = weui;

//鼠标点击延迟问题处理
import fastClick from "fastclick";
fastClick.attach(document.body);

Vue.config.productionTip = false;

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount("#app");
